import type { GeneratedEtsLibFile } from "../../types/generated";

export const FILE: GeneratedEtsLibFile = {
  path: 'ets/api/@ohos.inputMethod.d.ts',
  content: "/*\n * Copyright (c) 2021 Huawei Device Co., Ltd.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file\n * @kit IMEKit\n */\nimport type { Callback, AsyncCallback } from './@ohos.base';\nimport type { ElementName } from './bundleManager/ElementName';\nimport InputMethodSubtype from './@ohos.InputMethodSubtype';\n/**\n * Input method\n *\n * @namespace inputMethod\n * @syscap SystemCapability.MiscServices.InputMethodFramework\n * @since 6\n */\ndeclare namespace inputMethod {\n    /**\n     * Keyboard max number\n     *\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 8\n     */\n    const MAX_TYPE_NUM: number;\n    /**\n     * Input method setting\n     *\n     * @returns { InputMethodSetting } the object of InputMethodSetting\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 8\n     * @deprecated since 9\n     * @useinstead inputMethod#getSetting\n     */\n    function getInputMethodSetting(): InputMethodSetting;\n    /**\n     * Input method controller\n     *\n     * @returns { InputMethodController } the object of InputMethodController.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 6\n     * @deprecated since 9\n     * @useinstead inputMethod#getController\n     */\n    function getInputMethodController(): InputMethodController;\n    /**\n     * Input method setting\n     *\n     * @returns { InputMethodSetting } the object of InputMethodSetting.\n     * @throws { BusinessError } 12800007 - input method setter error. Possible cause:\n     *     create InputmethodSetting object failed.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 9\n     */\n    function getSetting(): InputMethodSetting;\n    /**\n     * Input method controller\n     *\n     * @returns { InputMethodController } the object of InputMethodController.\n     * @throws { BusinessError } 12800006 - input method controller error. Possible cause:\n     *     create InputmethodController object failed.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 9\n     */\n    function getController(): InputMethodController;\n    /**\n     * Get default input method\n     *\n     * @returns { InputMethodProperty } property of the default input method.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 11\n     */\n    function getDefaultInputMethod(): InputMethodProperty;\n    /**\n     * Get system input method config ability\n     *\n     * @returns { ElementName } the information of system input method config ability.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 11\n     */\n    function getSystemInputMethodConfigAbility(): ElementName;\n    /**\n     * Switch input method\n     *\n     * @permission ohos.permission.CONNECT_IME_ABILITY\n     * @param { InputMethodProperty } target - indicates the input method which will replace the current one.\n     * @param { AsyncCallback<boolean> } callback - the callback of switchInputMethod.\n     * @throws { BusinessError } 201 - permissions check fails.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 9\n     */\n    /**\n     * Switch input method. The caller must be the current inputmethod.\n     *\n     * @param { InputMethodProperty } target - indicates the target input method.\n     * @param { AsyncCallback<boolean> } callback - the callback of switchInputMethod.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 11\n     */\n    function switchInputMethod(target: InputMethodProperty, callback: AsyncCallback<boolean>): void;\n    /**\n     * Switch input method\n     *\n     * @permission ohos.permission.CONNECT_IME_ABILITY\n     * @param { InputMethodProperty } target - Indicates the input method which will replace the current one.\n     * @returns { Promise<boolean> } the promise returned by the function.\n     * @throws { BusinessError } 201 - permissions check fails.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 9\n     */\n    /**\n     * Switch input method. The caller must be the current inputmethod.\n     *\n     * @param { InputMethodProperty } target - indicates the target input method.\n     * @returns { Promise<boolean> } the promise returned by the function.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 11\n     */\n    function switchInputMethod(target: InputMethodProperty): Promise<boolean>;\n    /**\n     * Get current input method\n     *\n     * @returns { InputMethodProperty } the property of current inputmethod.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 9\n     */\n    function getCurrentInputMethod(): InputMethodProperty;\n    /**\n     * Switch current input method subtype\n     *\n     * @permission ohos.permission.CONNECT_IME_ABILITY\n     * @param { InputMethodSubtype } target - Indicates the input method subtype which will replace the current one.\n     * @param { AsyncCallback<boolean> } callback - the callback of switchCurrentInputMethodSubtype.\n     * @throws { BusinessError } 201 - permissions check fails.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 9\n     */\n    /**\n     * Switch current input method subtype, if this interface is invoked by the current IME, this permission is ignored.\n     *\n     * @permission ohos.permission.CONNECT_IME_ABILITY\n     * @param { InputMethodSubtype } target - Indicates the input method subtype which will replace the current one.\n     * @param { AsyncCallback<boolean> } callback - the callback of switchCurrentInputMethodSubtype.\n     * @throws { BusinessError } 201 - permissions check fails.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    /**\n     * Switch current input method subtype. The caller must be the current inputmethod.\n     *\n     * @param { InputMethodSubtype } target - indicates the target input method subtype.\n     * @param { AsyncCallback<boolean> } callback - the callback of switchCurrentInputMethodSubtype.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 11\n     */\n    function switchCurrentInputMethodSubtype(target: InputMethodSubtype, callback: AsyncCallback<boolean>): void;\n    /**\n     * Switch current input method subtype\n     *\n     * @permission ohos.permission.CONNECT_IME_ABILITY\n     * @param { InputMethodSubtype } target - Indicates the input method subtype which will replace the current one.\n     * @returns { Promise<boolean> } the promise returned by the function.\n     * @throws { BusinessError } 201 - permissions check fails.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 9\n     */\n    /**\n     * Switch current input method subtype, if this interface is invoked by the current IME, this permission is ignored.\n     *\n     * @permission ohos.permission.CONNECT_IME_ABILITY\n     * @param { InputMethodSubtype } target - Indicates the input method subtype which will replace the current one.\n     * @returns { Promise<boolean> } the promise returned by the function.\n     * @throws { BusinessError } 201 - permissions check fails.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    /**\n     * Switch current input method subtype. The caller must be the current inputmethod.\n     *\n     * @param { InputMethodSubtype } target - indicates the target input method subtype.\n     * @returns { Promise<boolean> } the promise returned by the function.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 11\n     */\n    function switchCurrentInputMethodSubtype(target: InputMethodSubtype): Promise<boolean>;\n    /**\n     * Get the current input method subtype\n     *\n     * @returns { InputMethodSubtype } the subtype of the current input method.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 9\n     */\n    function getCurrentInputMethodSubtype(): InputMethodSubtype;\n    /**\n     * Switch input method and subtype. If the caller is an input method, it must be the current inputmethod.\n     *\n     * @permission ohos.permission.CONNECT_IME_ABILITY\n     * @param { InputMethodProperty } inputMethodProperty - Indicates the target input method.\n     * @param { InputMethodSubtype } inputMethodSubtype - Indicates the target input method subtype.\n     * @param { AsyncCallback<boolean> } callback - the callback of switchCurrentInputMethodAndSubtype.\n     * @throws { BusinessError } 201 - permissions check fails.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 9\n     */\n    /**\n     * Switch input method and subtype. The caller must be the current inputmethod.\n     *\n     * @param { InputMethodProperty } inputMethodProperty - indicates the target input method.\n     * @param { InputMethodSubtype } inputMethodSubtype - indicates the target input method subtype.\n     * @param { AsyncCallback<boolean> } callback - the callback of switchCurrentInputMethodAndSubtype.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 11\n     */\n    function switchCurrentInputMethodAndSubtype(inputMethodProperty: InputMethodProperty, inputMethodSubtype: InputMethodSubtype, callback: AsyncCallback<boolean>): void;\n    /**\n     * Switch input method and subtype. If the caller is an input method, it must be the current inputmethod.\n     *\n     * @permission ohos.permission.CONNECT_IME_ABILITY\n     * @param { InputMethodProperty } inputMethodProperty - Indicates the target input method.\n     * @param { InputMethodSubtype } inputMethodSubtype - Indicates the target input method subtype.\n     * @returns { Promise<boolean> } the promise returned by the function.\n     * @throws { BusinessError } 201 - permissions check fails.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 9\n     */\n    /**\n     * Switch input method and subtype. The caller must be the current inputmethod.\n     *\n     * @param { InputMethodProperty } inputMethodProperty - indicates the target input method.\n     * @param { InputMethodSubtype } inputMethodSubtype - indicates the target input method subtype.\n     * @returns { Promise<boolean> } the promise returned by the function.\n     * @throws { BusinessError } 401 - parameter error. Possible causes:\n     *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n     * @throws { BusinessError } 12800005 - configuration persistence error.\n     * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n     *     a system error, such as null pointer, IPC exception.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 11\n     */\n    function switchCurrentInputMethodAndSubtype(inputMethodProperty: InputMethodProperty, inputMethodSubtype: InputMethodSubtype): Promise<boolean>;\n    /**\n     * @interface InputMethodSetting\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 8\n     */\n    interface InputMethodSetting {\n        /**\n         * Subscribe input method or subtype change.\n         *\n         * @param { 'imeChange' } type - Indicates the event type.\n         * @param { function } callback - the callback of 'imeChange'\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        on(type: 'imeChange', callback: (inputMethodProperty: InputMethodProperty, inputMethodSubtype: InputMethodSubtype) => void): void;\n        /**\n         * Unsubscribe input method or subtype change.\n         *\n         * @param { 'imeChange' } type - Indicates the event type.\n         * @param { function } [callback] - the callback of 'imeChange',\n         *        when subscriber unsubscribes all callback functions of event 'imeChange', this parameter can be left blank.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        off(type: 'imeChange', callback?: (inputMethodProperty: InputMethodProperty, inputMethodSubtype: InputMethodSubtype) => void): void;\n        /**\n         * List subtype of the specified input method.\n         *\n         * @param { InputMethodProperty } inputMethodProperty - the property of the specified inputmethod.\n         * @param { AsyncCallback<Array<InputMethodSubtype>> } callback - the callback of listInputMethodSubtype.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800001 - bundle manager error.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        listInputMethodSubtype(inputMethodProperty: InputMethodProperty, callback: AsyncCallback<Array<InputMethodSubtype>>): void;\n        /**\n         * List subtype of the specified input method.\n         *\n         * @param { InputMethodProperty } inputMethodProperty - Indicates the specified input method.\n         * @returns { Promise<Array<InputMethodSubtype>> } the promise returned by the function.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800001 - bundle manager error.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        listInputMethodSubtype(inputMethodProperty: InputMethodProperty): Promise<Array<InputMethodSubtype>>;\n        /**\n         * List subtype of current input method\n         *\n         * @param { AsyncCallback<Array<InputMethodSubtype>> } callback - the callback of listCurrentInputMethodSubtype.\n         * @throws { BusinessError } 12800001 - bundle manager error.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        listCurrentInputMethodSubtype(callback: AsyncCallback<Array<InputMethodSubtype>>): void;\n        /**\n         * List subtype of current input method\n         *\n         * @returns { Promise<Array<InputMethodSubtype>> } the promise returned by the function.\n         * @throws { BusinessError } 12800001 - bundle manager error.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        listCurrentInputMethodSubtype(): Promise<Array<InputMethodSubtype>>;\n        /**\n         * List input methods\n         *\n         * @param { boolean } enable -\n         *     If true, collect enabled input methods.\n         *     If false, collect disabled input methods.\n         * @param { AsyncCallback<Array<InputMethodProperty>> } callback - the callback of getInputMethods.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.\n         * @throws { BusinessError } 12800001 - bundle manager error.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        getInputMethods(enable: boolean, callback: AsyncCallback<Array<InputMethodProperty>>): void;\n        /**\n         * List input methods\n         *\n         * @param { boolean } enable -\n         *     If true, collect enabled input methods.\n         *     If false, collect disabled input methods.\n         * @returns { Promise<Array<InputMethodProperty>> } the promise returned by the function.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *      1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.\n         * @throws { BusinessError } 12800001 - bundle manager error.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        getInputMethods(enable: boolean): Promise<Array<InputMethodProperty>>;\n        /**\n         * List enabled or disabled input methods sync\n         *\n         * @param { boolean } enable -\n         *     If true, collect enabled input methods.\n         *     If false, collect disabled input methods.\n         * @returns { Array<InputMethodProperty> } the list of inputmethod.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.\n         * @throws { BusinessError } 12800001 - bundle manager error.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 11\n         */\n        getInputMethodsSync(enable: boolean): Array<InputMethodProperty>;\n        /**\n         * List all input methods\n         *\n         * @param { AsyncCallback<Array<InputMethodProperty>> } callback - the callback of getInputMethods.\n         * @throws { BusinessError } 12800001 - bundle manager error.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 11\n         */\n        getAllInputMethods(callback: AsyncCallback<Array<InputMethodProperty>>): void;\n        /**\n         * List all input methods\n         *\n         * @returns { Promise<Array<InputMethodProperty>> } the promise returned by the function.\n         * @throws { BusinessError } 12800001 - bundle manager error.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 11\n         */\n        getAllInputMethods(): Promise<Array<InputMethodProperty>>;\n        /**\n         * List all input methods sync\n         *\n         * @returns { Array<InputMethodProperty> } the list of all inputmethod.\n         * @throws { BusinessError } 12800001 - bundle manager error.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 11\n         */\n        getAllInputMethodsSync(): Array<InputMethodProperty>;\n        /**\n         * @param { AsyncCallback<Array<InputMethodProperty>> } callback - the callback of listInputMethod.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 8\n         * @deprecated since 9\n         * @useinstead inputMethod.InputMethodSetting#getInputMethods\n         */\n        listInputMethod(callback: AsyncCallback<Array<InputMethodProperty>>): void;\n        /**\n         * @returns { Promise<Array<InputMethodProperty>> } the promise returned by the function.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 8\n         * @deprecated since 9\n         * @useinstead inputMethod.InputMethodSetting#getInputMethods\n         */\n        listInputMethod(): Promise<Array<InputMethodProperty>>;\n        /**\n         * Show input method setting extension dialog\n         *\n         * @param { AsyncCallback<boolean> } callback - the callback of showOptionalInputMethods.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         * @deprecated since 18\n         */\n        showOptionalInputMethods(callback: AsyncCallback<boolean>): void;\n        /**\n         * Show input method setting extension dialog\n         *\n         * @returns { Promise<boolean> } the promise returned by the function.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         * @deprecated since 18\n         */\n        showOptionalInputMethods(): Promise<boolean>;\n        /**\n         * @param { AsyncCallback<void> } callback - the callback of displayOptionalInputMethod.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 8\n         * @deprecated since 9\n         * @useinstead inputMethod.InputMethodSetting#showOptionalInputMethods\n         */\n        displayOptionalInputMethod(callback: AsyncCallback<void>): void;\n        /**\n         * @returns { Promise<void> } the promise returned by the function.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 8\n         * @deprecated since 9\n         * @useinstead inputMethod.InputMethodSetting#showOptionalInputMethods\n         */\n        displayOptionalInputMethod(): Promise<void>;\n        /**\n         * The input method application calls this interface to obtain its own enabled state.\n         *\n         * @returns { Promise<EnabledState> } the promise returned by the function.\n         * @throws { BusinessError } 12800004 - not an input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 15\n         */\n        getInputMethodState(): Promise<EnabledState>;\n    }\n    /**\n     * @interface InputMethodController\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 6\n     */\n    interface InputMethodController {\n        /**\n         * Attach application to the input method service.\n         *\n         * @param { boolean } showKeyboard - show the keyboard or not when attach the input method.\n         * @param { TextConfig } textConfig - indicates the config of the textInput.\n         * @param { AsyncCallback<void> } callback - the callback of attach.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        attach(showKeyboard: boolean, textConfig: TextConfig, callback: AsyncCallback<void>): void;\n        /**\n         * Attach application to the input method service.\n         *\n         * @param { boolean } showKeyboard - show the keyboard or not when attach the input method.\n         * @param { TextConfig } textConfig - indicates the config of the textInput.\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        attach(showKeyboard: boolean, textConfig: TextConfig): Promise<void>;\n        /**\n         * Attach application to the input method service.\n         *\n         * @param { boolean } showKeyboard - show the keyboard or not when attach the input method.\n         * @param { TextConfig } textConfig - indicates the config of the textInput.\n         * @param { RequestKeyboardReason } requestKeyboardReason - requestKeyboardReason of show the keyboard .\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 15\n         */\n        attach(showKeyboard: boolean, textConfig: TextConfig, requestKeyboardReason: RequestKeyboardReason): Promise<void>;\n        /**\n         * Discard the typing text\n         *\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 12800003 - input method client error.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @throws { BusinessError } 12800015 - the other side does not accept the request.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 20\n         */\n        discardTypingText(): Promise<void>;\n        /**\n         * Show the text input and start typing.\n         *\n         * @param { AsyncCallback<void> } callback - the callback of showTextInput.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        showTextInput(callback: AsyncCallback<void>): void;\n        /**\n         * Show the text input and start typing.\n         *\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        showTextInput(): Promise<void>;\n        /**\n         * Show the text input and start typing.\n         *\n         * @param { RequestKeyboardReason } requestKeyboardReason - requestKeyboardReason of show the keyboard .\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 15\n         */\n        showTextInput(requestKeyboardReason: RequestKeyboardReason): Promise<void>;\n        /**\n         * Hide the text input and stop typing.\n         *\n         * @param { AsyncCallback<void> } callback - the callback of hideTextInput.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        hideTextInput(callback: AsyncCallback<void>): void;\n        /**\n         * Hide the text input and stop typing.\n         *\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        hideTextInput(): Promise<void>;\n        /**\n         * Detach the applications from the input method manager service.\n         *\n         * @param { AsyncCallback<void> } callback - the callback of detach.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        detach(callback: AsyncCallback<void>): void;\n        /**\n         * Detach the applications from the input method manager service.\n         *\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        detach(): Promise<void>;\n        /**\n         * Inform the system of the window ID of the application currently bound to the input method.\n         * After the correct setting, the window where the client is located can avoid the input method window.\n         *\n         * @param { number } windowId - the window ID of the application currently bound to the input method.\n         * @param { AsyncCallback<void> } callback - the callback of setCallingWindow.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        setCallingWindow(windowId: number, callback: AsyncCallback<void>): void;\n        /**\n         * Inform the system of the window ID of the application currently bound to the input method.\n         * After the correct setting, the window where the client is located can avoid the input method window.\n         *\n         * @param { number } windowId - the window ID of the application currently bound to the input method.\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        setCallingWindow(windowId: number): Promise<void>;\n        /**\n         * Update Cursor and notify the input method that the current application cursor has changed.\n         *\n         * @param { CursorInfo } cursorInfo - the CursorInfo object.\n         * @param { AsyncCallback<void> } callback - the callback of updateCursor.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        updateCursor(cursorInfo: CursorInfo, callback: AsyncCallback<void>): void;\n        /**\n         * Update Cursor and notify the input method that the current application cursor has changed.\n         *\n         * @param { CursorInfo } cursorInfo - the CursorInfo object.\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        updateCursor(cursorInfo: CursorInfo): Promise<void>;\n        /**\n         * Notify the input method the selected text and the selection range of the current application text has changed.\n         *\n         * @param { string } text - the whole input text.\n         * @param { number } start - start position of selected text.\n         * @param { number } end - end position of selected text.\n         * @param { AsyncCallback<void> } callback - the callback of changeSelection.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        changeSelection(text: string, start: number, end: number, callback: AsyncCallback<void>): void;\n        /**\n         * Notify the input method the selected text and the selection range of the current application text has changed.\n         *\n         * @param { string } text - the selected text.\n         * @param { number } start - start position of selected text.\n         * @param { number } end - end position of selected text.\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        changeSelection(text: string, start: number, end: number): Promise<void>;\n        /**\n         * Update InputAttribute information of input text.\n         *\n         * @param { InputAttribute } attribute - the InputAttribute object.\n         * @param { AsyncCallback<void> } callback - the callback of updateAttribute.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        updateAttribute(attribute: InputAttribute, callback: AsyncCallback<void>): void;\n        /**\n         * Update InputAttribute information of input text.\n         *\n         * @param { InputAttribute } attribute - the InputAttribute object.\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        updateAttribute(attribute: InputAttribute): Promise<void>;\n        /**\n         * Stop input session\n         *\n         * @param { AsyncCallback<boolean> } callback - the callback of stopInputSession.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        stopInputSession(callback: AsyncCallback<boolean>): void;\n        /**\n         * Stop input session\n         *\n         * @returns { Promise<boolean> } the promise returned by the function.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        stopInputSession(): Promise<boolean>;\n        /**\n         * Stop input\n         *\n         * @param { AsyncCallback<boolean> } callback - the callback of stopInput.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 6\n         * @deprecated since 9\n         * @useinstead inputMethod.InputMethodController#stopInputSession\n         */\n        stopInput(callback: AsyncCallback<boolean>): void;\n        /**\n         * Stop input\n         *\n         * @returns { Promise<boolean> } the promise returned by the function.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 6\n         * @deprecated since 9\n         * @useinstead inputMethod.InputMethodController#stopInputSession\n         */\n        stopInput(): Promise<boolean>;\n        /**\n         * Show soft keyboard.\n         * This API can be called only by system applications.\n         *\n         * @permission ohos.permission.CONNECT_IME_ABILITY\n         * @param { AsyncCallback<void> } callback - the callback of showSoftKeyboard.\n         * @throws { BusinessError } 201 - permissions check fails.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        showSoftKeyboard(callback: AsyncCallback<void>): void;\n        /**\n         * Show soft keyboard.\n         * This API can be called only by system applications.\n         *\n         * @permission ohos.permission.CONNECT_IME_ABILITY\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 201 - permissions check fails.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        showSoftKeyboard(): Promise<void>;\n        /**\n         * Hide soft keyboard.\n         * This API can be called only by system applications.\n         *\n         * @permission ohos.permission.CONNECT_IME_ABILITY\n         * @param { AsyncCallback<void> } callback - the callback of hideSoftKeyboard.\n         * @throws { BusinessError } 201 - permissions check fails.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        hideSoftKeyboard(callback: AsyncCallback<void>): void;\n        /**\n         * Hide soft keyboard.\n         * This API can be called only by system applications.\n         *\n         * @permission ohos.permission.CONNECT_IME_ABILITY\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 201 - permissions check fails.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800008 - input method manager service error. Possible cause:\n         *     a system error, such as null pointer, IPC exception.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        hideSoftKeyboard(): Promise<void>;\n        /**\n         * Send message to input method.\n         *\n         * @param { string } msgId - the identifier of the message. Max size is 256B.\n         * @param { ?ArrayBuffer } [msgParam] - the param of the custom message. Max size is 128KB.\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1. Incorrect parameter types. 2. Incorrect parameter length.\n         * @throws { BusinessError } 12800003 - input method client error. Possible causes:\n         *     1.the edit box is not focused. 2.no edit box is bound to current input method application.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @throws { BusinessError } 12800014 - the input method is in basic mode.\n         * @throws { BusinessError } 12800015 - the other side does not accept the request.\n         * @throws { BusinessError } 12800016 - input method client is not editable.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 15\n         */\n        sendMessage(msgId: string, msgParam?: ArrayBuffer): Promise<void>;\n        /**\n         * Start receiving message from input method.\n         *\n         * @param { ?MessageHandler } [msgHandler] - optional, the handler of the custom message.\n         * @throws { BusinessError } 401 - parameter error. Possible causes: 1. Incorrect parameter types.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 15\n         */\n        recvMessage(msgHandler?: MessageHandler): void;\n        /**\n         * Register a callback and when IME sends select event with range of selection,\n         * the callback will be invoked.\n         *\n         * @param { 'selectByRange' } type - event type, fixed as 'selectByRange'.\n         * @param { Callback<Range> } callback - processes selectByRange command. The range of selection is provided for\n         *        this callback, and subscribers are expected to select corresponding text in callback according to\n         *        the range.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        on(type: 'selectByRange', callback: Callback<Range>): void;\n        /**\n         * Unregister the callback of selectedByRange.\n         *\n         * @param { 'selectByRange' } type - event type, fixed as 'selectByRange'.\n         * @param { Callback<Range> } [callback] - the callback of 'selectByRange',\n         *        when subscriber unsubscribes all callback functions of event 'selectByRange', this parameter can be left blank.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        off(type: 'selectByRange', callback?: Callback<Range>): void;\n        /**\n         * Register a callback and when IME sends select event witch movement of cursor,\n         * the callback will be invoked.\n         *\n         * @param { 'selectByMovement' } type - event type, fixed as 'selectByMovement'.\n         * @param { Callback<Movement> } callback - processes selectByMovement command. The movement of cursor is provided\n         *        for this callback, and subscribers are expected to select corresponding text in callback according to\n         *        the movement.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        on(type: 'selectByMovement', callback: Callback<Movement>): void;\n        /**\n         * Unregister the callback of selectedByMovement.\n         *\n         * @param { 'selectByMovement' } type - event type, fixed as 'selectByMovement'.\n         * @param { Callback<Movement> } [callback] - the callback of 'selectByMovement',\n         *        when subscriber unsubscribes all callback functions of event 'selectByMovement', this parameter can be left blank.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        off(type: 'selectByMovement', callback?: Callback<Movement>): void;\n        /**\n         * Register a callback and when IME sends insert text event, the callback will be invoked.\n         *\n         * @param { 'insertText' } type - event type, fixed as 'insertText'.\n         * @param { function } callback - processes insertText command. The text of insert is provided for this callback.\n         *        Subscribers are expected to process the inserted text and update changes in editor by changeSelection and updateCursor as needed.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        on(type: 'insertText', callback: (text: string) => void): void;\n        /**\n         * Unregister the callback of insertText.\n         *\n         * @param { 'insertText' } type - event type, fixed as 'insertText'.\n         * @param { function } [callback] - the callback of 'insertText',\n         *        when subscriber unsubscribes all callback functions of event 'insertText', this parameter can be left blank.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        off(type: 'insertText', callback?: (text: string) => void): void;\n        /**\n         * Register a callback and when IME sends delete left event with length,\n         * the callback will be invoked.\n         *\n         * @param { 'deleteLeft' } type - event type, fixed as 'deleteLeft'.\n         * @param { function } callback - processes deleteLeft command. The length of\n         *     delete is provided for this callback. Subscribers are expected to delete specified length of text\n         *     to the left of the cursor and update changes in editor by changeSelection and updateCursor as needed.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        on(type: 'deleteLeft', callback: (length: number) => void): void;\n        /**\n         * Unregister the callback of deleteLeft.\n         *\n         * @param { 'deleteLeft' } type - event type, fixed as 'deleteLeft'.\n         * @param { function } [callback] - the callback of 'deleteLeft',\n         *        when subscriber unsubscribes all callback functions of event 'deleteLeft', this parameter can be left blank.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        off(type: 'deleteLeft', callback?: (length: number) => void): void;\n        /**\n         * Register a callback and when IME sends delete right event with length,\n         * the callback will be invoked.\n         *\n         * @param { 'deleteRight' } type - event type, fixed as 'deleteRight'.\n         * @param { function } callback - processes deleteRight command. The length of\n         *     delete is provided for this callback. Subscribers are expected to delete specified length of text\n         *     to the right of the cursor and update changes in editor by changeSelection and updateCursor as needed.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        on(type: 'deleteRight', callback: (length: number) => void): void;\n        /**\n         * Unregister the callback of deleteRight.\n         *\n         * @param { 'deleteRight' } type - event type, fixed as 'deleteRight'.\n         * @param { function } [callback] - the callback of 'deleteRight',\n         *        when subscriber unsubscribes all callback functions of event 'deleteRight', this parameter can be left blank.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        off(type: 'deleteRight', callback?: (length: number) => void): void;\n        /**\n         * Register a callback and when IME sends keyboard status, the callback will be invoked.\n         *\n         * @param { 'sendKeyboardStatus' } type - event type, fixed as 'sendKeyboardStatus'.\n         * @param { function } callback - processes sendKeyboardStatus command.\n         *     The keyboardStatus is provided for this callback.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        on(type: 'sendKeyboardStatus', callback: (keyboardStatus: KeyboardStatus) => void): void;\n        /**\n         * Unregister the callback of sendKeyboardStatus.\n         *\n         * @param { 'sendKeyboardStatus' } type - event type, fixed as 'sendKeyboardStatus'.\n         * @param { function } [callback] - the callback of 'sendKeyboardStatus',\n         *        when subscriber unsubscribes all callback functions of event 'sendKeyboardStatus', this parameter can be left blank.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        off(type: 'sendKeyboardStatus', callback?: (keyboardStatus: KeyboardStatus) => void): void;\n        /**\n         * Register a callback and when IME sends functionKey, the callback will be invoked.\n         *\n         * @param { 'sendFunctionKey' } type - event type, fixed as 'sendFunctionKey'.\n         * @param { function } callback - processes sendFunctionKey command.\n         *     The functionKey is provided for this callback.Subscribers are expected to complete the\n         *     corresponding task based on the value of functionKey.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        on(type: 'sendFunctionKey', callback: (functionKey: FunctionKey) => void): void;\n        /**\n         * Unregister the callback of sendFunctionKey.\n         *\n         * @param { 'sendFunctionKey' } type - event type, fixed as 'sendFunctionKey'.\n         * @param { function } [callback] - the callback of 'sendFunctionKey',\n         *        when subscriber unsubscribes all callback functions of event 'sendFunctionKey', this parameter can be left blank.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        off(type: 'sendFunctionKey', callback?: (functionKey: FunctionKey) => void): void;\n        /**\n         * Register a callback and when IME sends move cursor, the callback will be invoked.\n         *\n         * @param { 'moveCursor' } type - event type, fixed as 'moveCursor'.\n         * @param { function } callback - processes moveCursor command. The direction of\n         *     cursor is provided for this callback. Subscribers are expected to move the cursor and update changes\n         *     in editor by changeSelection and updateCursor.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        on(type: 'moveCursor', callback: (direction: Direction) => void): void;\n        /**\n         * Unregister the callback of moveCursor.\n         *\n         * @param { 'moveCursor' } type - event type, fixed as 'moveCursor'.\n         * @param { function } [callback] - the callback of 'moveCursor',\n         *        when subscriber unsubscribes all callback functions of event 'moveCursor', this parameter can be left blank.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        off(type: 'moveCursor', callback?: (direction: Direction) => void): void;\n        /**\n         * Register a callback and when IME sends extend action code, the callback will be invoked.\n         *\n         * @param { 'handleExtendAction' } type - event type, fixed as 'handleExtendAction'.\n         * @param { function } callback - processes handleExtendAction command. The action code\n         *     is provided for this callback.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        on(type: 'handleExtendAction', callback: (action: ExtendAction) => void): void;\n        /**\n         * Unregister the callback of handleExtendAction.\n         *\n         * @param { 'handleExtendAction' } type - event type, fixed as 'handleExtendAction'.\n         * @param { function } [callback] - the callback of 'handleExtendAction',\n         *        when subscriber unsubscribes all callback functions of event 'handleExtendAction', this parameter can be left blank.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        off(type: 'handleExtendAction', callback?: (action: ExtendAction) => void): void;\n        /**\n         * Register a callback and when input method ability gets left text of cursor, the callback will be invoked.\n         *\n         * @param { 'getLeftTextOfCursor' } type - event type, fixed as 'getLeftTextOfCursor'.\n         * @param { function } callback - processes getLeftTextOfCursor command. The callback\n         *     must be a synchronization method and will block the input method application.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        on(type: 'getLeftTextOfCursor', callback: (length: number) => string): void;\n        /**\n         * Unregister the callback of getLeftTextOfCursor event.\n         *\n         * @param { 'getLeftTextOfCursor' } type - event type, fixed as 'getLeftTextOfCursor'.\n         * @param { function } [callback] - the callback of 'getLeftTextOfCursor',\n         *     when subscriber unsubscribes all callback functions of event 'getLeftTextOfCursor', this parameter can be left blank.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        off(type: 'getLeftTextOfCursor', callback?: (length: number) => string): void;\n        /**\n         * Register a callback and when input method ability gets right text of cursor, the callback will be invoked.\n         *\n         * @param { 'getRightTextOfCursor' } type - event type, fixed as 'getRightTextOfCursor'.\n         * @param { function } callback - processes getRightTextOfCursor command. The callback\n         *     must be a synchronization method and will block the input method application.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        on(type: 'getRightTextOfCursor', callback: (length: number) => string): void;\n        /**\n         * Unregister the callback of getRightTextOfCursor event.\n         *\n         * @param { 'getRightTextOfCursor' } type - event type, fixed as 'getRightTextOfCursor'.\n         * @param { function } [callback] - the callback of 'getRightTextOfCursor',\n         *     when subscriber unsubscribes all callback functions of event 'getRightTextOfCursor', this parameter can be left blank.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        off(type: 'getRightTextOfCursor', callback?: (length: number) => string): void;\n        /**\n         * Register a callback and when input method ability gets the text index at cursor, the callback will be invoked.\n         *\n         * @param { 'getTextIndexAtCursor' } type - event type, fixed as 'getTextIndexAtCursor'.\n         * @param { function } callback - processes getTextIndexAtCursor command. The callback\n         *     must be a synchronization method, and should return the text index at the cursor.\n         * @throws { BusinessError } 401 - parameter error. Possible causes:\n         *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.\n         * @throws { BusinessError } 12800009 - input method client detached.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        on(type: 'getTextIndexAtCursor', callback: () => number): void;\n        /**\n         * Unregister the callback of getTextIndexAtCursor.\n         *\n         * @param { 'getTextIndexAtCursor' } type - event type, fixed as 'getTextIndexAtCursor'.\n         * @param { function } [callback] - the callback of 'getTextIndexAtCursor',\n         *     when subscriber unsubscribes all callback functions of event 'getTextIndexAtCursor', this parameter can be left blank.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        off(type: 'getTextIndexAtCursor', callback?: () => number): void;\n        /**\n         * <p>Subscribe 'setPreviewText' event.</p>\n         * <p>To support the preview text feature, developers should subscribe to this event before calling attach.</p>\n         *\n         * @param { 'setPreviewText' } type - the type of subscribe event.\n         * @param { SetPreviewTextCallback } callback - the callback of on('setPreviewText').\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         *     1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. 3.Parameter verification failed.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 17\n         */\n        on(type: 'setPreviewText', callback: SetPreviewTextCallback): void;\n        /**\n         * Unsubscribe 'setPreviewText' event.\n         *\n         * @param { 'setPreviewText' } type - the type of unsubscribe event.\n         * @param { SetPreviewTextCallback } [callback] - optional, the callback of off('setPreviewText').\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 17\n         */\n        off(type: 'setPreviewText', callback?: SetPreviewTextCallback): void;\n        /**\n         * <p>Subscribe 'finishTextPreview' event.</p>\n         * <p>To support the preview text feature, developers should subscribe to this event before calling attach.</p>\n         *\n         * @param { 'finishTextPreview' } type - the type of subscribe event.\n         * @param { Callback<void> } callback - the callback of on('finishTextPreview').\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         *     1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. 3.Parameter verification failed.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 17\n         */\n        on(type: 'finishTextPreview', callback: Callback<void>): void;\n        /**\n         * Unsubscribe 'finishTextPreview' event.\n         *\n         * @param { 'finishTextPreview' } type - the type of unsubscribe event.\n         * @param { Callback<void> } [callback] - optional, the callback of off('finishTextPreview').\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 17\n         */\n        off(type: 'finishTextPreview', callback?: Callback<void>): void;\n    }\n    /**\n     * input method property\n     *\n     * @interface InputMethodProperty\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 8\n     */\n    interface InputMethodProperty {\n        /**\n         * The name of input method\n         *\n         * @type { string }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 8\n         * @deprecated since 9\n         * @useinstead inputMethod.InputMethodProperty#name\n         */\n        readonly packageName: string;\n        /**\n         * The id of input method\n         *\n         * @type { string }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 8\n         * @deprecated since 9\n         * @useinstead inputMethod.InputMethodProperty#id\n         */\n        readonly methodId: string;\n        /**\n         * The name of input method\n         *\n         * @type { string }\n         * @readonly\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        readonly name: string;\n        /**\n         * The id of input method\n         *\n         * @type { string }\n         * @readonly\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        readonly id: string;\n        /**\n         * The label of input method\n         *\n         * @type { ?string }\n         * @readonly\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        readonly label?: string;\n        /**\n         * The label id of input method\n         *\n         * @type { ?number }\n         * @readonly\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        readonly labelId?: number;\n        /**\n         * The icon of input method\n         *\n         * @type { ?string }\n         * @readonly\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        readonly icon?: string;\n        /**\n         * The icon id of input method\n         *\n         * @type { ?number }\n         * @readonly\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        readonly iconId?: number;\n        /**\n         * The enabledState of input method\n         *\n         * @type { ?EnabledState }\n         * @readonly\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 20\n         */\n        readonly enabledState?: EnabledState;\n        /**\n         * The extra info of input method\n         *\n         * @type { object }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 9\n         */\n        /**\n         * The extra info of input method\n         *\n         * @type { ?object }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        extra?: object;\n    }\n    /**\n     * Enumerates the moving direction of cursor\n     *\n     * @enum { number }\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    export enum Direction {\n        /**\n         * Cursor moves up\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        CURSOR_UP = 1,\n        /**\n         * Cursor moves down\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        CURSOR_DOWN,\n        /**\n         * Cursor moves left\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        CURSOR_LEFT,\n        /**\n         * Cursor moves right\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        CURSOR_RIGHT\n    }\n    /**\n     * Range of selected text.\n     *\n     * @typedef Range\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    export interface Range {\n        /**\n         * Indicates the index of the first character of the selected text.\n         *\n         * @type { number }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        start: number;\n        /**\n         * Indicates the index of the last character of the selected text.\n         *\n         * @type { number }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        end: number;\n    }\n    /**\n     * Movement of cursor.\n     *\n     * @typedef Movement\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    export interface Movement {\n        /**\n         * Indicates the direction of cursor movement\n         *\n         * @type { Direction }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        direction: Direction;\n    }\n    /**\n     * Enumerates the text input type.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    export enum TextInputType {\n        /**\n         * The text input type is NONE.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        NONE = -1,\n        /**\n         * The text input type is TEXT.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        TEXT = 0,\n        /**\n         * The text input type is MULTILINE.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        MULTILINE,\n        /**\n         * The text input type is NUMBER.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        NUMBER,\n        /**\n         * The text input type is PHONE.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        PHONE,\n        /**\n         * The text input type is DATETIME.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        DATETIME,\n        /**\n         * The text input type is EMAIL_ADDRESS.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        EMAIL_ADDRESS,\n        /**\n         * The text input type is URL.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        URL,\n        /**\n         * The text input type is VISIBLE_PASSWORD.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        VISIBLE_PASSWORD,\n        /**\n         * The text input type is NUMBER_PASSWORD.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 11\n         */\n        NUMBER_PASSWORD,\n        /**\n         * The text input type is SCREEN_LOCK_PASSWORD.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 20\n         */\n        SCREEN_LOCK_PASSWORD,\n        /**\n         * The text input type is USER_NAME.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 20\n         */\n        USER_NAME,\n        /**\n         * The text input type is NEW_PASSWORD.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 20\n         */\n        NEW_PASSWORD,\n        /**\n         * The text input type is NUMBER_DECIMAL.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 20\n         */\n        NUMBER_DECIMAL,\n        /**\n         * The text input type is ONE_TIME_CODE.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 20\n         */\n        ONE_TIME_CODE\n    }\n    /**\n     * Enumerates the enter key type.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    export enum EnterKeyType {\n        /**\n         * The enter key type is UNSPECIFIED.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        UNSPECIFIED = 0,\n        /**\n         * The enter key type is NONE.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        NONE,\n        /**\n         * The enter key type is GO.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        GO,\n        /**\n         * The enter key type is SEARCH.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        SEARCH,\n        /**\n         * The enter key type is SEND.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        SEND,\n        /**\n         * The enter key type is NEXT.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        NEXT,\n        /**\n         * The enter key type is DONE.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        DONE,\n        /**\n         * The enter key type is PREVIOUS.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        PREVIOUS,\n        /**\n       * The enter key type is NEWLINE.\n       *\n       * @syscap SystemCapability.MiscServices.InputMethodFramework\n       * @since 12\n       */\n        NEWLINE\n    }\n    /**\n     * Enumerates the keyboard status.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    export enum KeyboardStatus {\n        /**\n         * The keyboard status is none.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        NONE = 0,\n        /**\n         * The keyboard status is hide.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        HIDE = 1,\n        /**\n         * The keyboard status is show.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        SHOW = 2\n    }\n    /**\n     * Attribute of Input.\n     *\n     * @typedef InputAttribute\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    export interface InputAttribute {\n        /**\n         * Indicates the text input type of the input method.\n         *\n         * @type { TextInputType }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        textInputType: TextInputType;\n        /**\n         * Indicates the enter key type of the input method.\n         *\n         * @type { EnterKeyType }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        enterKeyType: EnterKeyType;\n        /**\n         * Placeholder text in the edit box.\n         *\n         * @type { ?string }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 20\n         */\n        placeholder?: string;\n        /**\n         * The name of the ability where the edit box is located.\n         *\n         * @type { ?string }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 20\n         */\n        abilityName?: string;\n    }\n    /**\n     * FunctionKey of Input.\n     *\n     * @typedef FunctionKey\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    export interface FunctionKey {\n        /**\n         * Indicates the enter key type of the input method.\n         *\n         * @type { EnterKeyType }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        enterKeyType: EnterKeyType;\n    }\n    /**\n     * Information of Cursor.\n     *\n     * @typedef CursorInfo\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    export interface CursorInfo {\n        /**\n         * Indicates the left point of the cursor info and must be absolute coordinate of the physical screen.\n         *\n         * @type { number }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        left: number;\n        /**\n         * Indicates the top point of the cursor info and must be absolute coordinate of the physical screen.\n         *\n         * @type { number }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        top: number;\n        /**\n         * Indicates the width point of the cursor info.\n         *\n         * @type { number }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        width: number;\n        /**\n         * Indicates the height point of the cursor info.\n         *\n         * @type { number }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        height: number;\n    }\n    /**\n     * Config of editor.\n     *\n     * @typedef TextConfig\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    export interface TextConfig {\n        /**\n         * Attribute of Input.\n         *\n         * @type { InputAttribute }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        inputAttribute: InputAttribute;\n        /**\n         * Cursor information.\n         *\n         * @type { ?CursorInfo }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        cursorInfo?: CursorInfo;\n        /**\n         * Selection information.\n         *\n         * @type { ?Range }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        selection?: Range;\n        /**\n         * The window ID of the application currently bound to the input method.\n         *\n         * @type { ?number }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        windowId?: number;\n        /**\n         *Indicates that this is a new edit box.\n         *\n         * @type { ?boolean }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 20\n         */\n        newEditBox?: boolean;\n        /**\n         * Indicates the capitalize mode of the edit box.\n         *\n         * @type { ?CapitalizeMode }\n         * @default CapitalizeMode.NONE\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 20\n         */\n        capitalizeMode?: CapitalizeMode;\n    }\n    /**\n     * Enumerates the extend action.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    export enum ExtendAction {\n        /**\n         * Select all text.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        SELECT_ALL = 0,\n        /**\n         * Cut selecting text.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        CUT = 3,\n        /**\n         * Copy selecting text.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        COPY = 4,\n        /**\n         * Paste from paste board.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        PASTE = 5\n    }\n    /**\n     * Information of input window.\n     *\n     * @typedef InputWindowInfo\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 10\n     */\n    export interface InputWindowInfo {\n        /**\n         * Indicates name of the input window.\n         *\n         * @type { string }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        name: string;\n        /**\n         * Indicates the abscissa of the upper-left vertex of input window.\n         *\n         * @type { number }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        left: number;\n        /**\n         * Indicates the ordinate of the upper-left vertex of input window.\n         *\n         * @type { number }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        top: number;\n        /**\n         * Indicates the width of the input window.\n         *\n         * @type { number }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        width: number;\n        /**\n         * Indicates the height of the input window.\n         *\n         * @type { number }\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 10\n         */\n        height: number;\n    }\n    /**\n     * <p>Custom message handler.</p>\n     * <p>Implement this interface to respond to custem messages.</p>\n     *\n     * @interface MessageHandler\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 15\n     */\n    interface MessageHandler {\n        /**\n         * This method is called when a custom message is received.\n         *\n         * @param { string } msgId - the identifier of the message.\n         * @param { ?ArrayBuffer } [msgParam] - the parameter of the custom message.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 15\n         */\n        onMessage(msgId: string, msgParam?: ArrayBuffer): void;\n        /**\n         * This method is called when a new message handler is set.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 15\n         */\n        onTerminated(): void;\n    }\n    /**\n     * Enumerates the enabled state.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 15\n     */\n    export enum EnabledState {\n        /**\n         * Disabled state.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 15\n         */\n        DISABLED = 0,\n        /**\n         * Enabled state with basic mode.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 15\n         */\n        BASIC_MODE,\n        /**\n         * Enabled state with full experience mode.\n         *\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 15\n         */\n        FULL_EXPERIENCE_MODE\n    }\n    /**\n     *  requestKeyboardReason of input click\n     *\n     * @enum { number }\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 15\n     */\n    export enum RequestKeyboardReason {\n        /**\n          * The request keyboard reason is NONE.\n          * @syscap SystemCapability.MiscServices.InputMethodFramework\n          * @since 15\n          */\n        NONE = 0,\n        /**\n         * The request keyboard reason is MOUSE.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 15\n         */\n        MOUSE = 1,\n        /**\n         * The request keyboard reason is TOUCH.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 15\n         */\n        TOUCH = 2,\n        /**\n         * The request keyboard reason is OTHER.\n         * @syscap SystemCapability.MiscServices.InputMethodFramework\n         * @since 15\n         */\n        OTHER = 20\n    }\n    /**\n     * The callback of 'setPreviewText' event.\n     *\n     * @typedef { function } SetPreviewTextCallback.\n     * @param { text } string - text to be previewed.\n     * @param { range } Range - the range of the text to be replaced by the preview text.\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 17\n     */\n    export type SetPreviewTextCallback = (text: string, range: Range) => void;\n    /**\n     * Enumerates the capitalization mode.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.MiscServices.InputMethodFramework\n     * @since 20\n     */\n    export enum CapitalizeMode {\n        /**\n          * Capitalize nothing.\n          *\n          * @syscap SystemCapability.MiscServices.InputMethodFramework\n          * @since 20\n          */\n        NONE = 0,\n        /**\n          * Capitalize the first letter of each sentence.\n          *\n          * @syscap SystemCapability.MiscServices.InputMethodFramework\n          * @since 20\n          */\n        SENTENCES,\n        /**\n          * Capitalize the first letter of each word.\n          *\n          * @syscap SystemCapability.MiscServices.InputMethodFramework\n          * @since 20\n          */\n        WORDS,\n        /**\n          * Capitalize each letter.\n          *\n          * @syscap SystemCapability.MiscServices.InputMethodFramework\n          * @since 20\n          */\n        CHARACTERS\n    }\n}\nexport default inputMethod;\n",
}
export default FILE;